from django.conf.urls import url

from . import views

# url 命名空间，在index.html中有使用到
app_name = "apps"
urlpatterns = [
    # eg apps
    url(r'^$', views.index, name='index'),

    # eg: /apps/1/
    url(r'^(?P<question_id>[0-9]+)/$', views.detail, name="detail"),

    # eg: /apps/1/vote
    url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),

    # eg: /apps/1/results
    url(r'^(?P<question_id>[0-9]+)/results/$', views.results, name='results'),
]